﻿@model AutomatedTestDataManagement.Models.SitesPage

@{
    ViewBag.Title = "Create";
}

<h2>Add Page to Site</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>SitesPage</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.SiteID, "Site")
        </div>
        <div class="editor-field">
            @Html.DropDownList("SiteID", String.Empty)
            @Html.ValidationMessageFor(model => model.SiteID)
            <input type="hidden" id="SelectedSiteID" value="@ViewBag.SelectedSiteID" name="SelectedSiteID" />
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PageID, "Page")
        </div>
        <div class="editor-field">
            @Html.DropDownList("PageID", String.Empty)
            @Html.ValidationMessageFor(model => model.PageID)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Add new Page", "Create", "Page", new {id = ViewBag.SelectedSiteID }, null) @Html.Encode(" | ")
    @Html.ActionLink("Return to Site", "Edit", "Site", new { id = ViewBag.SelectedSiteID }, null) 
    <div>
        @Html.Partial("_NavigationManagementNav")
    </div>

</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
